import { createApp } from 'vue'

import Cookies from 'js-cookie'

import "./assets/styles/element/index.scss";

import ElementPlus from 'element-plus'
// import 'element-plus/dist/index.css'
// import 'element-plus/theme-chalk/dark/css-vars.css'
import locale from 'element-plus/es/locale/lang/zh-cn'


import App from './App'
import store from './store'
import router from './router'
import init from "./init";


// svg图标
import 'virtual:svg-icons-register'

import './permission' // permission control


const app = createApp(App)

app.use(init);
app.use(router)
app.use(store)


// 使用element-plus 并且设置全局的大小
app.use(ElementPlus, {
  locale: locale,
  // 支持 large、default、small
  size: Cookies.get('size') || 'default'
})

app.mount('#app')
